package com.training.java.core.unittest;

import junit.framework.TestCase;

import org.junit.Test;

public class CalculatorTest {
	
	@Test
	public void TestAdd()
	{
		Calculator calc = new Calculator();
		int result = calc.add(2, 3);
		
		TestCase.assertEquals(5, result);
		System.out.println("Result Sum = " + result);
	}
	
	@Test
	public void TestSubtract()
	{
		Calculator cal = new Calculator();
		int result = cal.subtract(6, 5);
		TestCase.assertEquals(1, result);
		System.out.println("Result subtract = " + result);
	}
	@Test
	public void TestMultiply()
	{
		Calculator cal = new Calculator();
		int result = cal.multiply(3, 4);
		TestCase.assertEquals(12, result);
		System.out.println("Result multiply = " + result);
	}
	
	@Test
	public void TestDivision()
	{
		Calculator cal = new Calculator();
		int result = cal.divide(6, 2);
		TestCase.assertEquals(3, result);
		System.out.println("Result divide = " + result);
	}
}